package com.joshua.spring.gateway.entity.form;

import lombok.Data;
import org.springframework.cloud.gateway.filter.FilterDefinition;
import org.springframework.cloud.gateway.handler.predicate.PredicateDefinition;

import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.List;

/**
 * description
 * package com.joshua.spring.com.joshua.spring.gateway.entity.form
 * classname  GatewayForm
 *
 * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
 * @date 2020/2/11 22:07
 */
@Data
public class GatewayForm {
    /**
     * 路由规则转发的目标uri
     */
    @NotEmpty
    private String uri;

    /**
     * 路由执行的顺序
     */
    private int order = 0;

    /**
     * swagger分组名称
     */
    private String applicationName;

    /**
     * 操作人
     */
    private String optUser;

    private List<FilterDefinition> filters = new ArrayList<>();

    private List<PredicateDefinition> predicates = new ArrayList<>();
}
